package artid.com.arttogo.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class InfoExpress extends AppItem implements Serializable {

	List<Info> list;
	String shipping_code = "";

	@Override
	public void parse(JSONObject obj) {
		if (null == obj) {
			return;
		}
		list = new ArrayList<Info>();
		JSONArray array = obj.optJSONArray("info");
		if (array==null) {
			return;
		}
		for (int i = 0; i < array.length(); i++) {
			try {
				JSONObject object = array.getJSONObject(i);
				Info info = new Info();
				info.setContext(object.optString("context"));
				info.setTime(object.optString("time"));
				info.setFtime(object.optString("ftime"));
				list.add(info);
			} catch (JSONException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		}
		shipping_code = obj.optString("shipping_code");

	}

	public List<Info> getList() {
		return list;
	}

	public void setList(List<Info> list) {
		this.list = list;
	}

	public String getShipping_code() {
		return shipping_code;
	}

	public void setShipping_code(String shipping_code) {
		this.shipping_code = shipping_code;
	}

	public class Info {
		String time;
		String context;
		String ftime;

		public String getFtime() {
			return ftime;
		}

		public void setFtime(String ftime) {
			this.ftime = ftime;
		}

		public String getTime() {
			return time;
		}

		public void setTime(String time) {
			this.time = time;
		}

		public String getContext() {
			return context;
		}

		public void setContext(String context) {
			this.context = context;
		}
	}

}
